import 'package:dmz/base/pageWidget/base_stateful_widget.dart';
import 'package:dmz/base/widget/defult_widget.dart';
import 'package:dmz/business/mine/controller/news_center_controller.dart';
import 'package:dmz/utils/sp_utils.dart';
import 'package:flutter/material.dart';

import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';

class NewsDetailsPage extends BaseStatefulWidget<NewsCenterController> {
  const NewsDetailsPage({super.key});

  @override
  String titleString() => '消息详情'.tr;

  @override
  bool delectControll() => false;

  @override
  Widget buildContent(BuildContext context) {
    return Column(crossAxisAlignment: CrossAxisAlignment.start, children: [
      DefaultText(
        controller.selectModel?.title ?? '',
        48.sp,
        textColor: Color(0xFFF9F9F9),
        fontWeight: FontWeight.w700,
      ).marginOnly(left: 30.sp, bottom: 20.sp),
      DefaultText(
              SPUtils.timeIntToTimeStr(controller.selectModel?.created_at ?? 0),
              28.sp,
              textColor: Color(0xFF999999))
          .marginOnly(left: 30.sp, bottom: 32.sp),
      Container(
          alignment: Alignment.center,
          height: 140.sp,
          color: Color(0xFF434650),
          child: DefaultText(
            controller.selectModel?.content ?? '',
            28.sp,
            textColor: Color(0xFFF9F9F9),
            fontWeight: FontWeight.w700,
          )).didClipRRectAll(56.sp)
    ]).marginOnly(left: 32.sp, right: 32.sp);
  }
}
